#include "Log.hpp"
#include "TcpServer.hpp"
#include "HttpServer.hpp"
#include <memory>
#include "Util.hpp"
#include "Protocol.hpp"

#define PORT 3389
static void Usage(std::string proc)
{
    std::cout << "Usage:\n\t" << proc << " port" << std::endl;
}
int main(int argc, char *argv[])
{
    // if (argc != 2)
    // {
    //     Usage(argv[0]);
    //     exit(4);
    // }
    // int port = atoi(argv[1]);
    int port = PORT;
    std::shared_ptr<HttpServer> http_server(new HttpServer(port));

    http_server->InitServer();
    http_server->Loop();

    // HttpServer hs;
    // hs.Loop();

    // TcpServer* ts = TcpServer::GetInstance(8080);
    // std::cout<<ts->Sock();
    // LOG(INFO,"for_test");
    return 0;
}